home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCGUIA 10
/
PC Guia 10.iso
/
database
/
shared.dir
/
01038_Script_1038
< prev
next >
Wrap
Text File
|
1996-03-14
|
3KB
|
115 lines
on GetWideCaptions start
global tmplist
set tmplist = []
set flist = "Filenames"
set num = the number of lines of field flist
put "Getting maker numbers..."
repeat with i = 1 to num
set tmp = line i of field flist
if notempty(tmp) then
set mnum = nametonum(tmp)
add(tmplist,mnum)
end if
end repeat
set flist = "Filenames2"
set num = the number of lines of field flist
repeat with i = 1 to num
set tmp = line i of field flist
if notempty(tmp) then
set mnum = nametonum(tmp)
add(tmplist,mnum)
end if
end repeat
put tmplist
set tmpcaptions = ""
set garticles = []
set num = count(tmplist)
repeat with i = start to num
set curart = getat(tmplist,i)
set tt = line 2 of field (curart && "script")
do tt
put tt
put gArticles
set widecap = the text of field (curart & ".cap-wide")
set cap = the text of field (curart & ".cap")
set the itemdelimiter = "@"
set numchap = count(gArticles)
set the itemdelimiter = ","
repeat with j = 1 to numchap
set the itemdelimiter = "@"
set chap = item j of cap
set widechap = item j of widecap
set the itemdelimiter = "#"
set numart = count(getat(gArticles,j))
set the itemdelimiter = ","
set tmpchapter = ""
repeat with k = 1 to numart
set the itemdelimiter = "#"
set thinarticle = item k of chap
set widearticle = item k of widechap
set the itemdelimiter = ","
set article = curart &"-"&j&"." & k
set numarticle = the number of cast article
put article && numarticle
set type = getat(getat(gArticles,j),k)
put "type = " && type
if type contains "pic" then
if numarticle > 0 then
if the width of cast numarticle > the height of cast numarticle then
put "wide!"
-- put widearticle
set thinarticle = widearticle
else
put "thin!"
-- put thinarticle
end if
end if
else if type contains "movie" then
set thinarticle = widearticle
end if
set the itemdelimiter = "#"
put thinarticle into item k of tmpchapter
set the itemdelimiter = ","
end repeat
set the itemdelimiter = "@"
put tmpchapter into item j of tmpcaptions
set the itemdelimiter = ","
end repeat
put tmpcaptions
put tmpcaptions into field (curart & ".cap-fixed")
end repeat
end
-- adds "name" to the end of the name
on widefixnames start,end
repeat with i = start to end
set tmpname = string(the name of cast i)
put "0ld " && tmpname
set the itemdelimiter = "."
set n = item 1 of tmpname
set the itemdelimiter = ","
set tmpname = n & ".cap"
set the name of cast i = tmpname
put "new" && tmpname
end repeat
end